import turtle as tl

tl.setup(500,500,0,0)
tl.pensize(2)
tl.pencolor('red')
tl.penup()
tl.pendown()
tl.setheading(0)
tl.forward(100)
tl.setheading(90)
tl.forward(100)
tl.setheading(180)
tl.forward(100)
tl.setheading(270)
tl.forward(100)
tl.done()